{
GtkWidget *parent;
graphene_rect_t bounds;
+ int nx, ny;
/* Don't consider the parent == widget case here. */
parent = _gtk_widget_get_parent (widget);
parent = _gtk_widget_get_parent (parent);
g_assert (GTK_IS_WINDOW (parent) || GTK_IS_POPOVER (parent));
+ gtk_native_get_surface_transform (GTK_NATIVE (parent), &nx, &ny);
if (gtk_widget_compute_bounds (widget, parent, &bounds))
{
*allocation = (GtkAllocation){
- floorf (bounds.origin.x),
- floorf (bounds.origin.y),
+ floorf (bounds.origin.x) + nx,
+ floorf (bounds.origin.y) + ny,
ceilf (bounds.size.width),
ceilf (bounds.size.height)
};